package com.web.main.entity.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @create 2020-11-22 20:53
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel(description = "被修改的对象")
public class AdminModify implements Serializable {

    private static final long serialVersionUID = -6192820674901371456L;
    @ApiModelProperty(value = "被修改管理员主键", required = true)
    @NotEmpty(message = "主键非空")
    @Size(min = 19, max = 19, message = "主键长度位19位")
    private String id;

    @ApiModelProperty(value = "修改后的姓名")
    @Size(min = 2, max = 4, message = "姓名长度应该在{mix}~{max}之间")
    private String name;

    @ApiModelProperty(value = "修改后的密码")
    @Size(min = 6, max = 8, message = "密码长度应该在{min}~{max}之间")
    private String password;

    @ApiModelProperty(value = "修改后的角色编号", dataType = "Integer")
    @Min(value = 0, message = "角色编号最小是{value}")
    @Max(value = 10, message = "角色编号最大是{value}")
    private Integer role;
}
